//<!--
// history log:  (06/02/98) changed: used logic navigator.useragent to test version of IE.
//               note:  cannot not use  parseInt(navigator.appVersion) >= 4 logic does not handle beta versioning stamp, must use


   S = new String(navigator.userAgent);
   index = S.indexOf("MSIE", 0);
   value = S.substring(index+5, index+6);



// check to see what browser version - if < 5, then alert

function isIE5Plus()
{
if (navigator.appName == "Microsoft Internet Explorer" && ( value >= 5)) {
return true;
}
else {
window.alert("This sample requires Internet Explorer 5.0 or greater.   ");
return false;
}
}


// check to see what browser version - if <= 4, then alert

function isIE4Plus()
{
if (navigator.appName == "Microsoft Internet Explorer" && (value >= 4)) {
return true;
}
else {
window.alert("This sample requires Internet Explorer 4.0 or greater.   ");
return false;
}
}

// display sample within separate window
function showSample(sURL)
  {
    var sFeatures = "top=50,left=50,height=350,width=400,scrollbars=yes,resizable=1";
    var oSampWin = window.open(sURL,"_blank",sFeatures)
  }

// display sample within separate window, with status bar display, & size of window
function showSampleStatus(sURL,sHeight,sWidth)
  {
var sFeatures = "top=50,left=50,height="+ (sHeight) +",width="+ (sWidth) + ",status=yes,scrollbars=yes,resizable=1";
var oSampWin = window.open(sURL,"_blank",sFeatures)

  }

// display source code of files within separate window 7/15/98
function showSource(sURL,sHeight,sWidth)
  {
    var sFeatures = "top=50,left=50,height="+ (sHeight) +",width="+ (sWidth) + ",status=yes,scrollbars=yes,resizable=1";

   //replace bad query string characters with encoded character
   while( (iBad = sURL.indexOf("+")) >= 0 )
   {
      sURL = sURL.substring(0,iBad) + "%2B" + sURL.substring(iBad+1,sURL.length);
   }

   //alert(document.protocol);
   if (document.protocol == "http:" || document.protocol.indexOf("Hyper")!=-1)
   {

     //Web solution.
     var vsURL="/gallery/samples/ShowSource.asp?Filename="+(sURL);
     var oSampWin = window.open(vsURL,"_blank",sFeatures)
}
else
{

     //XBuilder solution.
     var vsRemove = (document.URL).toLowerCase();
     var vsURL = sURL.toLowerCase();

     //Replace forward slashs with back slashs in document.URL
     while( (iPos = vsRemove.indexOf('/')) >= 0 )
     {
        vsRemove = vsRemove.substring(0,iPos) + '\\' + vsRemove.substring(iPos+1,vsRemove.length);
     }

     //replace bad query string characters with encoded character
     while( (iBad = vsRemove.indexOf("+")) >= 0 )
     {
        vsRemove = vsRemove.substring(0,iBad) + "%2b" + vsRemove.substring(iBad+1,vsRemove.length);
     }

     //Remove the filename from the URL
     vsRemove = vsRemove.substring(0,(vsRemove.lastIndexOf('\\')+1));
     //Remove the URL up to the sample directory
     vsRemove = vsRemove.substring((vsRemove.indexOf('\\gallery\\samples\\')+17), vsRemove.length);

     vsURL = vsURL.substring((vsURL.indexOf(vsRemove)+vsRemove.length+1), vsURL.length);
     var oSampWin = window.open(vsURL + ".htm","_blank",sFeatures)

}
  }


//-->
